From 275eb3c1745a795fc150b422b6a3d54ff5801290 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sat, 19 Aug 2017 02:37:22 +0200 Subject: [PATCH] babl: make some of the new space API internal for now --- babl/babl-internal.h | 47 +++++++++++++++++++++++++ babl/babl.h | 82 ++++++++++---------------------------------- 2 files changed, 65 insertions(+), 64 deletions(-) diff --git a/babl/babl-internal.h b/babl/babl-internal.h index 65c6c22..2ac404a 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -343,8 +343,55 @@ double babl_trc_to_linear (const Babl *trc, double value); float babl_trc_from_linearf (const Babl *trc, float value); float babl_trc_to_linearf (const Babl *trc, float value); +/** + * babl_space_get_chromaticities: + * + * Returns the CIE xyY chromaticity values for white point and primaries for a + * space. + */ +void babl_space_get_chromaticities (const Babl *space, + double *wx, double *wy, + double *rx, double *ry, + double *gx, double *gy, + double *bx, double *by); + const Babl * babl_trc_new (const char *name, BablTRCType type, double gamma); +/** + * babl_trc_from_linear: + * + * Makes linear data non-linear according to the trc. + */ +double babl_trc_from_linear (const Babl *trc, double value); + +/** + * babl_trc_from_linear: + * + * Makes non-linear data with the TRC linear data. + */ +double babl_trc_to_linear (const Babl *trc, double value); + +/** + * babl_trc_from_linearf: + * + * Makes linear data non-linear according to the trc, single precision float, + * a little bit faster than the double version. + */ +float babl_trc_from_linearf (const Babl *trc, float value); + +/** + * babl_trc_from_linearf: + * + * Makes non-linear data with the TRC linear data, single precision float + * alittle bit faster than the double version. + */ +float babl_trc_to_linearf (const Babl *trc, float value); + +void babl_space_to_xyz (const Babl *space, const double *rgb, double *xyz); +void babl_space_from_xyz (const Babl *space, const double *xyz, double *rgb); + + + #endif diff --git a/babl/babl.h b/babl/babl.h index 6eed5ea..c0bf1a8 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -80,27 +80,6 @@ const Babl * babl_component (const char *name); */ const Babl * babl_model (const char *name); -/** - * babl_format: - * - * Returns the babl object representing the color format given by - * @name such as for example "RGB u8", "CMYK float" or "CIE Lab u16". - */ -const Babl * babl_format (const char *name); - - -/** - * babl_format_with_space: - * - * Returns the babl object representing the color format given by - * @name such as for example "RGB u8", "R'G'B'A float", "Y float" with - * a specific RGB working space used as the space, the resulting format - * has -space suffixed to it, unless the space requested is sRGB then - * the unsuffixed version is used. If a format is passed in as space - * the space of the format is used. - */ -const Babl * babl_format_with_space (const char *name, const Babl *space); - /** * babl_trc: * @@ -116,35 +95,6 @@ const Babl * babl_trc (const char *name); */ const Babl * babl_trc_gamma (double gamma); -/** - * babl_trc_from_linear: - * - * Makes linear data non-linear according to the trc. - */ -double babl_trc_from_linear (const Babl *trc, double value); - -/** - * babl_trc_from_linear: - * - * Makes non-linear data with the TRC linear data. - */ -double babl_trc_to_linear (const Babl *trc, double value); - -/** - * babl_trc_from_linearf: - * - * Makes linear data non-linear according to the trc, single precision float, - * a little bit faster than the double version. - */ -float babl_trc_from_linearf (const Babl *trc, float value); - -/** - * babl_trc_from_linearf: - * - * Makes non-linear data with the TRC linear data, single precision float - * alittle bit faster than the double version. - */ -float babl_trc_to_linearf (const Babl *trc, float value); /** * babl_space: @@ -172,9 +122,25 @@ const Babl * babl_space_new (const char *name, const Babl *trc_green, const Babl *trc_blue); +/** + * babl_format: + * + * Returns the babl object representing the color format given by + * @name such as for example "RGB u8", "CMYK float" or "CIE Lab u16". + */ +const Babl * babl_format (const char *name); -void babl_space_to_xyz (const Babl *space, const double *rgb, double *xyz); -void babl_space_from_xyz (const Babl *space, const double *xyz, double *rgb); +/** + * babl_format_with_space: + * + * Returns the babl object representing the color format given by + * @name such as for example "RGB u8", "R'G'B'A float", "Y float" with + * a specific RGB working space used as the space, the resulting format + * has -space suffixed to it, unless the space requested is sRGB then + * the unsuffixed version is used. If a format is passed in as space + * the space of the format is used. + */ +const Babl * babl_format_with_space (const char *name, const Babl *space); /* * babl_format_get_space: @@ -183,18 +149,6 @@ void babl_space_from_xyz (const Babl *space, const double *xyz, double *rgb); */ const Babl * babl_format_get_space (const Babl *format); -/** - * babl_space_get_chromaticities: - * - * Returns the CIE xyY chromaticity values for white point and primaries for a - * space. - */ -void babl_space_get_chromaticities (const Babl *space, - double *wx, double *wy, - double *rx, double *ry, - double *gx, double *gy, - double *bx, double *by); - /** * babl_fish: -- 2.30.2